using System;
using System.Configuration;
using System.Runtime.Serialization;
using System.Security.Permissions;

namespace Catalyst.Caching
{
	[Serializable]
	public class MemcachedSection : ConfigurationSection
	{
		SocketPoolElementCollection m_SocketPools;

		[ConfigurationProperty("socketPools", IsRequired = true)]
		[ConfigurationCollection(typeof(SocketPoolElementCollection),
			AddItemName = "add",
			ClearItemsName = "clear",
			RemoveItemName = "remove")]
		public SocketPoolElementCollection SocketPools
		{
			get
			{
				if (m_SocketPools == null)
				{
					m_SocketPools = (SocketPoolElementCollection)base["socketPools"];
				}

				return m_SocketPools;
			}
			set { m_SocketPools = value; }
		}
	}
}